<%@ page import="gracker.Task" %>



<div class="fieldcontain ${hasErrors(bean: taskInstance, field: 'name', 'error')} required">
	<label for="name">
		<g:message code="task.name.label" default="Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textArea name="name" cols="40" rows="5" maxlength="1000" required="" value="${taskInstance?.name}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: taskInstance, field: 'description', 'error')} required">
	<label for="description">
		<g:message code="task.description.label" default="Description" />
		<span class="required-indicator">*</span>
	</label>
	<g:textArea name="description" cols="40" rows="5" maxlength="999999" required="" value="${taskInstance?.description}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: taskInstance, field: 'dueDate', 'error')} required">
	<label for="dueDate">
		<g:message code="task.dueDate.label" default="Due Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="dueDate" precision="day"  value="${taskInstance?.dueDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: taskInstance, field: 'assigne', 'error')} required">
	<label for="assigne">
		<g:message code="task.assigne.label" default="Assigne" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="assigne" name="assigne.id" from="${gracker.User.list()}" optionKey="id" required="" value="${taskInstance?.assigne?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: taskInstance, field: 'project', 'error')} required">
	<label for="project">
		<g:message code="task.project.label" default="Project" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="project" name="project.id" from="${gracker.Project.list()}" optionKey="id" required="" value="${taskInstance?.project?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: taskInstance, field: 'status', 'error')} ">
    <label for="status">
        <g:message code="project.status.label" default="Status" />

    </label>
    <g:select name="status" from="${taskInstance.constraints.status.inList}" value="${taskInstance?.status}" valueMessagePrefix="project.status" noSelection="['': '']"/>
</div>

